package com.elong.qadev.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.Table;

@Entity
@Table(name = "HTTP_ENTITIES", schema = "ti")
public class Entities {

	public Entities(String type, String data, int id, int caseId) {
		super();
		this.type = type;
		this.data = data;
		this.id = id;
		CaseId = caseId;
	}

	private String type;
	private String data;
	private int id;
	private int CaseId;
	
	
	public void setData(String data) {
		this.data = data;
	}

	@Column(name = "CASEID", nullable = false, length = 50)
	public int getCaseId() {
		return CaseId;
	}

	public void setCaseId(int caseId) {
		CaseId = caseId;
	}
	public Entities() {
		super();
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "ID", unique = true, nullable = false, length = 10)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

	

	@Column(name = "TYPE", nullable = true, length = 50)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	//columnDefinition="CLOB"
	@Lob 
	@Basic(fetch = FetchType.LAZY) 
	@Column(name="DATA", nullable=true)
	public String getData() {
		return data;
	}

	@Override
	public String toString() {
		return "Entities [type=" + type + ", data=" + data + ", id=" + id + ", CaseId=" + CaseId + "]";
	}

	
	

}
